<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition template="/layouts/CrudPesquisar.xhtml">
	<ui:param name="bean" value="#{ManageBancoVagas}" />

	<ui:define name="breadcrumb_content">
		<h:outputLink value="#" title="Banco de Vagas" styleClass="active">Banco de Vagas</h:outputLink>
	</ui:define>
		
	<ui:define name="quick_links">

	</ui:define>
			
	<ui:define name="OUTRAS_ACOES">
	</ui:define>


	<ui:define name="PESQUISA">
	</ui:define>

	<ui:define name="COLUNAS">
		<h:column>
			<f:facet name="header">
				<h:outputText value="Orientador/Disponibilidade" />
			</f:facet>
			<h:outputText value="#{item.nome} " style="#{item.disponivel ? 'color: blue;' : 'color: red;' }" />
			/
			<h:outputText value=" #{item.disponibilidadeReal}"  style="#{item.disponivel ? 'color: blue;' : 'color: red;' }" />
			
			<rich:toolTip>
				
				<h:outputText value="Não há instrumentos de conclusão em aberto" rendered="#{empty item.instrumentosAbertos}"/>
				<rich:dataTable value="#{item.instrumentosAbertos}" var="item" rendered="#{not empty item.instrumentosAbertos}">
					<h:column>
						<f:facet name="header">
							<h:outputText value="Aluno" />
						</f:facet>
						<h:outputText value="#{item.aluno.nome}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Tipo" />
						</f:facet>
						<h:outputText value="#{item.tipoInstrumentoConclusao.nome}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Título" />
						</f:facet>
						<h:outputText value="#{item.titulo}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Início - Fim" >
							</h:outputText>
						</f:facet>
						<h:outputText value="#{item.inicio}" >
								<f:convertDateTime pattern="dd/MM/yyyy"/>
						</h:outputText>  
						<h:outputText value=" - " />
						<h:outputText value="#{item.fim}" >
							<f:convertDateTime pattern="dd/MM/yyyy"/>  
						</h:outputText>
					</h:column>
				</rich:dataTable>
				
	        </rich:toolTip>
		</h:column>
	</ui:define>
	
	<ui:define name="COLUNA_ACOES_DIREITA">
	</ui:define>	
	
	<ui:define name="ACOES">
	</ui:define>
	<ui:define name="COLUNA_ACOES">
	</ui:define>
		

	</ui:composition>

</html>
